/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout/index.vue'
const chargingStationRouter = [
  {
    path: '/',
    component: Layout,
    redirect: '/chargingStation',
    name: 'chargingStation',
    meta: {
      title: '充电桩',
      icon: 'School',
      roles: ['ROLE_ADMIN'],
    },
    children: [
      {
        path: 'homePage',
        component: () => import('@/views/chargingStation/homePage/index.vue'),
        name: 'homePage',
        meta: {
          title: '总览',
          icon: 'House',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'inputData',
        component: () => import('@/views/chargingStation/uploadTab/index.vue'),
        name: 'inputData',
        meta: {
          title: '文件导入',
          icon: 'Upload',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'dataHandle',
        component: () => import('@/views/chargingStation/dataHandle/index.vue'),
        name: 'dataHandle',
        meta: {
          title: '数据处理',
          icon: 'Paperclip',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'communityTable',
        component: () => import('@/views/chargingStation/communityTable/index.vue'),
        name: 'communityTable',
        meta: {
          title: '小区管理',
          icon: 'OfficeBuilding',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'communityInfo',
        component: () => import('@/views/chargingStation/communityInfo/index.vue'),
        name: 'communityInfo',
        hidden: true,
        meta: {
          title: '小区详情',
          icon: 'OfficeBuilding',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'siteTable',
        component: () => import('@/views/chargingStation/siteTable/index.vue'),
        name: 'siteTable',
        meta: {
          title: '站点管理',
          icon: 'Location',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'siteInfo',
        component: () => import('@/views/chargingStation/siteInfo/index.vue'),
        name: 'siteInfo',
        hidden: true,
        meta: {
          title: '站点详情',
          icon: 'Location',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'dataSummary',
        component: () => import('@/views/chargingStation/dataSummary/index.vue'),
        name: 'dataSummary',
        meta: {
          title: '分成数据汇总',
          icon: 'DataAnalysis',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'divideIntoData',
        component: () => import('@/views/chargingStation/divideIntoData/index.vue'),
        name: 'divideIntoData',
        meta: {
          title: '分成记录汇总',
          icon: 'DataAnalysis',
          roles: ['ROLE_ADMIN'],
        },
      },
    ],
  },
]

export default chargingStationRouter
